home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
gt_power
/
gth035.zip
/
GT-INST.BAT
< prev
next >
Wrap
DOS Batch File
|
1990-11-12
|
7KB
|
181 lines
set %gth%=gth-035
echo off
cls
if not "%3." == "." goto argok
echo .
echo GT-INST is for installing GT Host from scratch.
echo Use it with 3 or 4 arguments, eg
echo .
echo ┌───────────────────────── Where to install GT and GT-HELP
echo │ ┌──────────────── Where to find your zip files
echo │ │ (could be A: for floppy)
echo │ │ ┌────── Where to install message bases
echo │ │ │ ┌─ If you have a Colour Screen
echo ┌─┴─┐ ┌────┴────┐ ┌──┴──┐ │
echo GT-INST C:\GT D:\TMP\ZIPS E:\MSGS C
echo .
echo This would create a directory C:\GT and install GT and %gth% there
echo using zip files in D:\TMP\ZIPS.
echo .
echo ╔═════════════════════════════════════════╗
Echo ║ You will need : ║
echo ║ PKUNZIP somewhere in your DOS path ║
echo ║ GT1550_2.ZIP or GR1550_2.ZIP ║
echo ║ %gth%.ZIP ║
echo ║ An EDITOR (eg Qedit) ║
echo ╚═════════════════════════════════════════╝
echo .
echo Important : you must have a drive prefix (eg C:) on all parameters.
goto instdone
:argok
set inst_psave=%path%
echo ┌──────────────────────────────────────────────────────
echo │ You wish to install GT in directory %1
echo │ using zips on drive or directory %2
echo │ with SYSOP and GENERAL message bases built from %3
echo └──────────────────────────────────────────────────────
echo Important : you must have a drive prefix (eg C:) on these parameters.
echo **If anything is wrong, press CTRL-C Now**
echo .
pause
cls
echo ╔══════════════════════════════════════════════════════════
echo ║ About to create default directories:
echo ╟──────────────────────────────────────────────────────────
echo ║ %1 for main GT directory
echo ║ %1\DOC for GT documents
echo ║ %1\CAP for GT capture files
echo ║ %1\DOWN for files you download or users upload
echo ║ %1\TXT for scripts and phone directories
echo ║ %1\BULLETS for system bulletins
echo ║ %1\HLP for GT-HELP text files
echo ║ %1\MM for MMR (and GT-HELP) control files
echo ║ %3 as root directory for message bases
echo ║ %3\GENERAL for general message base
echo ║ %3\SYSOP for sysop message area
echo ╟──────────────────────────────────────────────────────────
echo ║ You can change these later, but you might have to read the docs.
echo ╚══════════════════════════════════════════════════════════
echo As this is a simple batch file, it cannot do much checking.
echo Where "Strike a key" appears, if the previous operation displayed
echo an unexpected error message, you should press CTRL-C to terminate.
echo .
echo If the message Unable to Create Directory appears it probably just means
echo the directory has already been created - if so, you can ignore that.
echo .
pause
md %1
md %1\DOC
md %1\MM
md %1\HLP
md %1\CAP
md %1\DOWN
md %1\TXT
md %1\BULLETS
md %3
md %3\GENERAL
md %3\SYSOP
cd %1
echo .
echo ┌──────────────────────────────────────────
echo │ About to unzip %2\G?1550_2.ZIP to %1
echo └──────────────────────────────────────────
pause
pkunzip -n %2\G?1550_2.ZIP %1\ *.EXE GT.WIN SYSOP.BBS
echo .
echo ┌──────────────────────────────────────────
echo │ About to create sample host text files to %1
echo └──────────────────────────────────────────
pause
rem
if exist %1\gtmdir.bbs goto gtmskip
echo Z %3\SYSOP Sysop Messages >> %1\gtmdir.bbs
echo X %3\GENERAL General Messages >> %1\gtmdir.bbs
:gtmskip
rem
if exist %1\gtdir.bbs goto gtdskip
echo Z %1\BULLETS System Bulletins >> %1\gtdir.bbs
:gtdskip
rem
pkunzip -n %2\G?1550_5.ZIP %1\ *.BAT *.?BS *.MAC *.SCR
echo .
echo ┌──────────────────────────────────────────
echo │ About to unzip host docs to %1\DOC
echo └──────────────────────────────────────────
pause
pkunzip -n %2\G?1550_2.ZIP %1\DOC\ *.1ST *.DOC *.GT
pkunzip -n %2\G?1550_5.ZIP %1\DOC\ *.DOC
echo .
echo ┌──────────────────────────────────────────
echo │ About to unzip %gth% to %1 and %1\HLP
echo │ and create default %1\HOST.BAT and %1\txt\GT.DIR files.
echo └──────────────────────────────────────────
pause
pkunzip -n %2\%gth%.ZIP %1\ *.exe *.com
pkunzip -n %2\%gth%.ZIP %1\HLP *.hlp *.dir *.cnf *.scr *.mst *.mdm
if not exist %1\gt.cnf copy %1\hlp\gth-base.cnf %1\gt.cnf
echo DP=%1\TXT >> %1\gt.cnf
echo TP=%1\DOWN >> %1\gt.cnf
echo SP=%1\TXT >> %1\gt.cnf
echo CP=%1\CAP >> %1\gt.cnf
echo MP=%1\GENERAL >> %1\gt.cnf
echo SM=%1\SYSOP >> %1\gt.cnf
echo DD=%1\BULLETS >> %1\gt.cnf
echo LO=%1 >> %1\gt.cnf
rem
if "%4." == "C." goto notmono
if "%4." == "c." goto notmono
type %1\hlp\mono.cnf >> %1\gt.cnf
:notmono
rem
if not exist %1\txt\gt.dir copy %1\hlp\gt.dir %1\txt\gt.dir
if not exist %1\txt\host.scr copy %1\host.scr %1\txt\host.scr
echo set gtpath=%1 > %1\host.bat
if exist %1\GT1550.EXE echo gt1550 /R2 host.scr >> %1\host.bat
if exist %1\GR1550.EXE echo gr1550 /R2 host.scr >> %1\host.bat
echo if errorlevel 255 host >> %1\host.bat
echo if errorlevel 6 netmail >> %1\host.bat
copy %1\hlp\config.scr %1\txt
del %1\hlp\config.scr
echo .
echo ┌───────────────────────────────────────────────────────────────────────┐
echo │ About to start GT-HELP - you will need to configure the FULL path │
echo │ of your editor. Then you can read the instructions for running │
echo │ GT-HELP and have a quick look through the setup files. │
echo └───────────────────────────────────────────────────────────────────────┘
echo ps - this will add %1 *temporarily* to your DOS path and create a
echo GTPATH environment variable, but you'll need to add it yourself
echo (to \autoexec.bat or elsewhere) before the next reboot.
echo .
pause
set path=%1;%path%
set gtpath=%1
GTH
cls
echo .
echo ╔══════════════════════════════════════════════════════════════════════
echo ║ About to start GT in terminal mode - using the ALT-I command to
echo ║ check the COM port, modem init strings etc.
echo ╟──────────────────────────────────────────────────────────────────────
echo ║ From here you might need to read the GT manual
echo ║ (you'll find it in the %1\DOC directory {grin}).
echo ╚══════════════════════════════════════════════════════════════════════
echo .
pause
if exist %1\GT1550.EXE gt1550 config
if exist %1\GR1550.EXE gr1550 config
cls
echo .
echo ╔═════════════════════════════════════════════════════════════
echo ║ Installation done -- restoring path to %inst_psave%
echo ╟─────────────────────────────────────────────────────────────
echo ║ Remember to include %1 in path (eg in \autoexec.bat) before running again
echo ╚═════════════════════════════════════════════════════════════
echo .
echo To execute GT-HELP, type GTH
echo To execute GT in HOST mode, type HOST
echo .
set path=%inst_psave%
set gth=
:instdone